<template>
	<view>
		<view class="header">
			<image src="../../../../static/icons/arrl.png" mode=""@tap="back"></image>
			<text>乐居</text>
		</view>
		<view class="main">
			<view>
				<view>订单支付成功</view>
				<view>支付金额:{{price}}元</view>
			</view>
		</view>
		<view class="footer">
			<view @tap="jumpUser">个人中心</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				price:""
			};
		},
		methods:{
			back() {
				var len = getCurrentPages().length
				if (len > 1) {
					uni.navigateBack({
						delta:1
					})
				} else {
					uni.switchTab({
						url:"/pages/home/home"
					})
				}
			},
			jumpUser() {
				uni.switchTab({
					url:"/pages/user/user"
				})
			}
		},
		onLoad(options) {
			console.log(options)
			this.price = options.prcie
		}
	}
</script>

<style lang="scss" scoped>
.header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #354e44;
	height: 60rpx;
	padding: 14rpx 6rpx;
	image {
		position: absolute;
		left: 4rpx;
		top: 50%;
		transform: translateY(-50%);
		width: 40rpx;
		height: 40rpx;
	}
	text {
		font-size: 32rpx;
		color: #FFFFFF;
		font-weight: bolder;
	}
}
.main {
	display: flex;
	flex-direction: column;
	align-items: center;
	color: #000000;
	margin-top: 280rpx;
	>view {
		>view {
			&:first-child {
				font-size: 48rpx;
			}
			&:last-child {
				font-size: 32rpx;
				margin-top: 10rpx;
			}
		}
	}
}
.footer {
	position: fixed;
	left: 0;
	bottom: 80rpx;
	width: 100%;
	display: flex;
	justify-content: center;
	>view {
		padding: 0 50rpx;
		border: solid 1px #354e44;
		border-radius: 10rpx;
		font-size: 34rpx;
		color: #354e44;
		line-height: 70rpx;
	}
}
</style>
